/**
 * @param {number} n
 * @param {number[][]} edges
 * @param {number} t
 * @param {number} target
 * @return {number}
 */
var frogPosition = function (n, edges, t, target) {
  let map = new Map(), level = new Map()
  level.set(1, 1)
  map.set(1, [1])
  for (let i = 0; i < edges.length; i++) {
    level.set(edges[i][1], level.get(edges[i][0]) + 1)
    map.set(level.get(edges[i][1]), map.has(level.get(edges[i][1])) ? map.get(level.get(edges[i][1])).concat([edges[i][1]]) : [edges[i][1]])
  }
  
  console.log(1);
};

frogPosition(7, [[1, 2], [1, 3], [1, 7], [2, 4], [2, 6], [3, 5]], 2, 4)